<template>
	<view class="content page" style="height: 100%;">
		<!-- <img class="imagebox" src="/static/index/home.png" style="width: 100%; height: auto;"  mode="widthFix" alt=""> -->
		<view class="text-area" @click="dianji">
			<text class="title">ererer</text>
			
			<text class="title">ererer</text>
		</view>
		<view style="margin-top: 20px;" class="text-area" @click="cl">
			<text class="title">测试</text>
			
			<text class="title">ererer</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
			cl(){
				uni.chooseMedia({
				  count: 9,
				  mediaType: ['image','video'],
				  sourceType: ['album', 'camera'],
				  maxDuration: 30,
				  camera: 'back',
				  success(res) {
				    console.log(res.tempFiles)
				  }
				})
			},
			dianji() {
				console.log(2)
			
				// 注意需要在真机调试查看
				uni.getChannelsLiveInfo({
					finderUserName: 'sphbiMGKyhx8Lp8',
					success: (res) => {
						console.log('直播间信息',res)
						uni.openChannelsLive({
							finderUserName: 'sphbiMGKyhx8Lp8',
							feedId: res.feedId,
							nonceId: res.nonceId,
							success: (res) => {
								console.log('打开直播',res)
							}
						})
					},
					fail:(res) => {
						console.log('直播间信息',res)
					},
					complete:(res) => {
						console.log('直播间信息2',res)
					},
				})
            },
		}
	}
</script>

<style>
	.page{height:100%; /*设置高度100%，达到满屏状态*/}
	.imagebox{display:flex;height: 100%;/*重点，铺满全屏*/justify-content: center;align-items:center;}
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
